﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CH2_1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("计算圆的信息");
            const float pi = 3.1415926f;    // 定义常量pi;
            double radius = 0.0, perimeter = 0.0, area = 0.0;
            Console.Write("请键入半径:");
            radius = Convert.ToDouble(Console.ReadLine());
            perimeter = pi * radius * 2.0;
            area = pi * radius * radius;
            Console.WriteLine("该圆的半径为{0},计算后的圆周长为{1},圆面积为{2}", radius, perimeter, area);
            Console.ReadLine();
        }
    }
}
